package com.atguigu.demo02.test01;

/**
 * @author gjl
 * @create 2021-04-25 13:09
 */
public class PrintThread {
    public static void main(String[] args) {
        Print print = new Print();




        /*new Thread(()->{
            for (int i = 0; i < 10; i++) {
                try {
                    print.print1();
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        },"A").start();
        new Thread(()->{
            for (int i = 0; i < 10; i++) {
                try {
                    print.print2();
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        },"B").start();
        new Thread(()->{
            for (int i = 0; i < 10; i++) {
                try {
                    print.print3();
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        },"C").start();*/



        //
        new Thread(()->{
            for (int i = 0; i < 10; i++) {
                print.printThree();
            }
        },"A").start();
        new Thread(()->{
            for (int i = 0; i < 10; i++) {
                print.printThree();
            }
        },"B").start();
        new Thread(()->{
            for (int i = 0; i < 10; i++) {
                print.printThree();
            }
        },"C").start();
    }
}
